import { createRouter, createWebHashHistory } from 'vue-router'

const Home = () => import('views/home/Home')
const Profile = () => import('views/profile/Profile')
const Shop = () => import('views/shop/Shop')
const ShopCart = () => import('views/shopcart/ShopCart')
const Detail = () => import('views/detail/Detail')
const routes = [
  {
    path: '',
    redirect: 'Home'
  },
  {
    path: '/Home',
    component: Home
  },
  {
    path: '/shop',
    component: Shop
  },
  {
    path: '/ShopCart',
    component: ShopCart
  },
  {
    path: '/Profile',
    component: Profile
  },
  {
    path: '/Detail/:iid',
    component: Detail
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
